local sandBorders = {[7943] = {NORTH, SOUTH}, [7944] = {WEST, EAST}, [7945] = {SOUTH, NORTH}, [7946] = {EAST, WEST}, [7947] = {SOUTH, NORTH}, [7948] = {SOUTH, NORTH}, [7949] = {NORTH, SOUTH}, [7950] = {NORTH, SOUTH}, [7951] = {SOUTH, NORTH}, [7952] = {SOUTH, NORTH}, [7953] = {NORTH, SOUTH}, [7954] = {NORTH, SOUTH}}
local swimmingOutfit = {lookType = 267, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}

function onStepIn(cid, item, pos)
  doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, hasCondition( cid, CONDITION_OUTFIT ) )
	if(sandBorders[item.itemid]) then
		if(hasCondition(cid, CONDITION_OUTFIT) ~= TRUE) then
			if( doMoveCreature(cid, sandBorders[item.itemid][1], true) == RETURNVALUE_NOERROR ) then
				doSetCreatureOutfit(cid, swimmingOutfit, -1)
				doSendMagicEffect(getThingPos(cid), CONST_ME_WATERSPLASH)
			else
				doMoveCreature(cid, sandBorders[item.itemid][2])
			end
		else
			if( doMoveCreature(cid, sandBorders[item.itemid][2], true) == RETURNVALUE_NOERROR ) then
				doRemoveCondition(cid, CONDITION_OUTFIT)
			else
				doMoveCreature(cid, sandBorders[item.itemid][1])
			end
		end	
	end
	return TRUE
end